<?php

function SXH() {
    $arr = [];
    for ( $i = 0; $i<1000; $i++ ) {
        $total = 0;
        $str = ( string ) $i;
        for ( $j = 0; $j<3; $j++ ) {
            $total += pow( $str[$j], 3 );
        }
        if ( $total == $i ) {
            $arr[] = $i;
        }
    }
    return $arr;
}
$r = SXH();
print_r( $r );
?>